<%-- 
    Document   : quanlytindang
    Created on : Mar 10, 2012, 4:04:21 PM
    Author     : huanht
--%>

<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.OutputKeys"%>
<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.Transformer"%>
<%@page import="javax.xml.transform.TransformerFactory"%>
<%@page import="javax.xml.transform.stream.StreamResult"%>
<%@page import="java.io.File"%>
<%@page import="javax.xml.transform.stream.StreamSource"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/xml"  prefix="x" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <title>Quản Lý Tin Đăng</title>
        <link rel="stylesheet" type="text/css" href="style.css" title="style"/>
        <link rel="stylesheet" type="text/css" href="popup.css" title="style"/>
        <script type="text/javascript" src="script/common.js"></script>
        <script type="text/javascript" src="script/search.js"></script>
        <script type="text/javascript" src="script/tab.js"></script>
        <script type="text/javascript" src="script/popup.js"></script>
        <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    </head>
    <body>
        <script type="text/javascript">
            var xmlString = "";
            
            function callAddDelete(msts) {
                xmlString +=  msts + ",";
                       
            }
            function callDelete() {
                
                document.getElementById("xmlString").value = xmlString;

            }

        </script>
        <jsp:include page="popupDangNhap.jsp" flush="true"/>

        <div id="userinfo" style="margin-left: 1000px">
            <logic:present name="LoginActionForm" property="nguoiDung">
                Xin chào, ${sessionScope.LoginActionForm.tendangnhap} ${sessionScope.LoginActionForm.nguoiDung.ten} (<a href="logout.do">Đăng xuất</a>)
            </logic:present>
            <logic:notPresent name="LoginActionForm" property="nguoiDung">
                <a href="javaScript: showHidePopup('dangnhapFormPopup','block');">Đăng nhập</a>
                |
                <a href="javaScript: showHidePopup('popupRegister','block');">Đăng kí</a>
            </logic:notPresent>
        </div>

        <div id="wrapper">
            <div id="header">
                <div id="logo">
                    <h1><a href="#">Nhà Đất</a></h1>
                </div>
                <div id="menu">
                    <ul>
                        <li class="first current_page_item"><a href="homepage.do">Trang Chủ</a></li>
                        <li><a href="tinHot.do">Tin Nổi Bật</a></li>
                        <li><a href="tinmoi.do">Tin Mới</a></li>
                        <li><a href="#">Thông Tin Cty</a></li>
                        <li class="last"><a href="#">Liên Hệ</a></li>
                    </ul>
                    <br class="clearfix" />
                </div>
            </div>

            <logic:present name="LoginActionForm" property="nguoiDung">
                <div style="margin-left:800px">
                    <a href="taotindang.do">Đăng Tin</a> | <a href="quanlytindang.do">Quản Lý Tin Đăng</a>
                </div>
            </logic:present>

            <div id="page">
                
                <div id="contentNew2">

                    <div class="box">
                        <form action="preUpdate.do" method="post">
                            <input type="hidden" name ="xmlString" id="xmlString"/>
                            <div id="submit2"> <input type="Submit" style="width:100px ; height: 30px" name="action" value="Hoàn Tất" onclick="callDelete()" /></div>
                        </form>
                        
                        <c:import url="xml/Tindang.xml" var="xml" charEncoding="UTF-8"/>
                        <c:import url="xsl/User_quanlytin.xsl" var="xsl" charEncoding="UTF-8"/>
                        
                        <x:transform xml="${xml}" xslt="${xsl} ">
                            <x:param name="user" value="${sessionScope.LoginActionForm.tendangnhap}"/>
                        </x:transform>

                    </div>
                </div>

            </div>


        </div>
    </body>
</html>
